// File:			R3.h
// Authors:			Richard Burris, Joshua Douty
// Purpose:			R3 header file
// Version:        	1.0
// Date:			10/28/2011


#include <dos.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>
//#include "mpx_supt.h"
#include "R1.h"
#include "R2.h"

typedef struct context{ //almost all the registers on the CPU, save for ss and sp
	unsigned int BP, DI, SI, DS, ES;
	unsigned int DX, CX, BX, AX;
	unsigned int IP, CS, FLAGS;
}context;

typedef struct params{
	int op_code;		//operation code, IDLE, EXIT, READ, WRITE, etc
	int device_id;		//TERMINAL, COM_PORT
	byte *buf_addr;		//Buffer address.  An unsigned char
	int *count_addr;	//size of the buffer
}params;



void interrupt sys_call();
void interrupt dispatch();
void sys_call_handler();
void R3_init();
//temp functions
void loadPCB();

//temp commands
void calldispatch();
void loadProcess();